1. Field of the Invention
The present invention relates to a printing technique using short distance wireless communication (for example, Near Field Communication).
2. Description of the Related Art
Conventional printing apparatuses have an arrangement to receive a print job from a host apparatus such as a personal computer, and executing printing. To do this in a wireless network environment, in many cases, a printing apparatus and a host apparatus connect to the same access point to transmit/receive a print job. To the contrary, since recent terminal apparatuses such as mobile phones and smartphones have rapidly become widespread, various different printing methods have been proposed. One of the new printing methods is a so-called cloud print mode in which a terminal apparatus transmits a print job to an external cloud printing server via the Internet, and a printing apparatus receives the print job from the cloud printing server to execute printing. According to the cloud print mode, a remote terminal apparatus which is not connected to an access point connected to a printing apparatus or a terminal apparatus which is connected to a mobile telephone line network can readily transmit a print job. Another new printing method is direct printing in which a terminal apparatus and a printing apparatus are directly connected via a wireless network, and transmit and receive a print job to execute printing. In direct printing, a terminal apparatus can discover a nearby printing apparatus, connect to the printing apparatus, and send a print job, thereby executing printing. To implement direct printing, various protocols such as a discovery protocol for discovering an apparatus and a negotiation protocol for establishing a connection for transmission/reception of information have been proposed and put into practice. Direct printing, however, often requires a printing apparatus and terminal apparatus to connect to a wireless network environment. To set the apparatuses in a communicable status by inputting connection conditions, appropriate knowledge and labor are required. Furthermore, a terminal apparatus side needs to select a printing apparatus to execute printing. If a plurality of printing apparatuses are arranged in a network environment, it is difficult to specify a printing apparatus as a desired output destination.
To solve this problem, for example, Japanese Patent Laid-Open No. 2004-364145 (to be referred to as patent literature 1 hereinafter) discloses a so-called handover technique in which a short distance wireless communication unit is provided in each of a terminal apparatus and a printing apparatus, and the terminal apparatus and the printing apparatus transfer communication conditions by short distance wireless communication in order to switch to a high-speed wireless network connection.
In the technique described in patent literature 1, however, if a printing apparatus is already connected to another terminal apparatus by a handover, a new terminal apparatus may not be able to connect to the printing apparatus by a handover depending on the type of direct printing.
When, for example, executing direct printing by performing wireless network connection in an ad hoc mode, a printing apparatus can be connected to only one terminal apparatus. If the printing apparatus is already connected to another apparatus in the ad hoc mode, it cannot be connected to a new terminal apparatus. The printing apparatus can operate as an access point, and a plurality of terminal apparatuses can be connected to the printing apparatus serving as an access point via the wireless network. To simultaneously communicate with the plurality of apparatuses, the printing apparatus is required to have a more advanced hardware arrangement, resulting in a higher apparatus cost. A practical example of the arrangement in which a printing apparatus operates as an access point is defined by the Wi-Fi Direct standard. According to this standard, when a printing apparatus serves as an access point, communication conditions such as an SSID are newly set, and a terminal apparatus is notified of the communication conditions and connected to the printing apparatus based on the WPS standard. In general, a printing apparatus operating in an infrastructure mode in a wireless network switches the mode to a Wi-Fi Direct mode by a handover which is caused by short distance wireless communication. That is, since it is necessary to newly set communication conditions every time an apparatus switches to the Wi-Fi Direct mode by a handover, it is more difficult to simultaneously connect a plurality of terminal apparatuses in response to their handover requests. Alternatively, assume that a plurality of terminal apparatuses can be connected to the wireless network. In this case, if the terminal apparatuses can be connected to each other, a security problem may arise and, therefore, it may be required to prohibit simultaneous connection of a plurality of terminal apparatuses. Furthermore, even if a printing apparatus and a terminal apparatus can be directly connected by a handover, the printing apparatus may not be able to receive a print job from the terminal apparatus while a print job from another terminal apparatus is in progress. Especially a low-cost printing apparatus has a small memory capacity for storing received print jobs. It is, therefore, difficult to configure such printing apparatus to simultaneously receive print jobs from a plurality of terminal apparatuses.
When it is impossible to execute direct printing by a handover as described above, a terminal apparatus which attempts to be connected later cannot transmit its own print job and needs to stand by until a print job in progress ends. During the standby time, the terminal apparatus side cannot perform another operation, and consumes its battery, thereby impairing the usability.